package edu.zjut.hjg.saas.biz.service;

import java.util.List;

import edu.zjut.hjg.saas.biz.model.User;
import edu.zjut.hjg.saas.biz.service.exception.ServiceException;
import edu.zjut.hjg.saas.biz.support.RoleName;

public interface UserService {
    User authenticate(int appId, String loginId, String password);

    Integer create(User user, String operator) throws ServiceException;

    void update(int id, String loginId, String name, int appId, String operator)
            throws ServiceException;

    void updatePassword(int id, String oldPassword, String newPassword) throws ServiceException;

    void resetPassword(int id, int appId, String newPassword, String operator);

    boolean isLoginIdExist(String loginId, int appId);

    List<User> listByRoleNameAndAppId(RoleName roleName, int appId);

    public void deleteByIdAndAppId(int id, int appId, String operator);
}
